﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Fcdbas.WinUI.Forms;

using Fcdbas.Platform.Interface;
using Fcdbas.WinUI.Common;
using Fcdbas.Core.Windows;
using Fcdbas.WinUI.Windows;
using Fcdbas.Platform.Properties;
using Fcdbas.Platform;
using Fcdbas.WinUI.Controls;
using Fcdbas.Core;

namespace Fcdbas.WinUI.Forms
{
    public partial class dlgRichEdit : cDialogWindow
    {
        private IEntity CurrentEntity;
        //private DataItem CurrentDItem;
        private cBlobEdit BlobEdit;
        public dlgRichEdit(IEntity currentEntity,string columnName,cBlobEdit blobEdit)
        {
            InitializeComponent();
            CurrentEntity = currentEntity;
           // CurrentDItem = di;
            rdDoc.CurrentEntity = currentEntity;
            rdDoc.ColumnName = columnName;
            rdDoc.DocDeleteCompleted += new EventHandler(rdDoc_DocDeleteCompleted);
            rdDoc.DocSaveCompleted += new EventHandler(rdDoc_DocSaveCompleted);
            this.BlobEdit = blobEdit;
            //rdDoc.BlobID = blobId;
        }

        void rdDoc_DocSaveCompleted(object sender, EventArgs e)
        {
            BlobEdit.BlobContentChange(e);
        }

        void rdDoc_DocDeleteCompleted(object sender, EventArgs e)
        {
            BlobEdit.BlobContentChange(e);
        }
    }
}
